package com.szr.leex.po.id;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.MappedSuperclass;

import org.hibernate.annotations.GenericGenerator;

import lombok.Data;

/**
 * string type identity entity
 * Created by WangChen on 2018/9/11 18:01.
 */
@Data
@MappedSuperclass
public abstract class StringIdentityEntity /*implements Serializable*/ {

    // TODO Effective Java 不建议 实现序列化 ???
    @Id
    @GeneratedValue(generator = "stringGenerator")
    @GenericGenerator(name = "stringGenerator", strategy = "com.szr.leex.po.generator.StringGenerator")
    @Column(length = 32)
    private String id; // primary key

}
